<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<c:set var="nature_value">
	<x:out
			select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value"/>
</c:set>
<input type="hidden" name="organization/whether_is_provincepark_value"
	   value="<x:out select="$xmlData/data/organization/whether_is_provincepark_value" />"/>
<div>
	<div class="t_bar"><span class="color_red">*</span>基本信息</div>
	<table class="t_css table01" width="100%" border="0" cellpadding="0"
		   id="centerInfo" cellspacing="1">
		<col style="width: 30%"/>
		<col style="width: 20%"/>
		<col style="width: 30%"/>
		<col style="width: 20%"/>
		<tr>
			<td align="right">中心名称：</td>
			<td colspan="3">
				<input type="text" name="proposal/zh_title" id="zh_title" style="width: 82%;" class="required"
					   maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title"/>" label="中心名称">
			</td>
		</tr>
		<tr>
			<td align="right">中心负责人：</td>
			<td>
				<input type="text" name="proposal/centre_fzr" id="centre_fzr" style="width: 82%;" class="required"
					   maxlength="100" value="<x:out select="$xmlData/data/proposal/centre_fzr"/>" label="中心负责人">
			</td>
			<td align="right">联系电话：</td>
			<td>
				<input type="text" name="proposal/tel_fzr" id="tel_fzr" style="width: 82%;" class="required"
					   maxlength="50"
					   value="<x:out select="$xmlData/data/proposal/tel_fzr"/>" label="中心负责人联系电话">
			</td>
		</tr>
		<tr>
			<td align="right">中心联系人：</td>
			<td>
				<input type="text" name="proposal/centre_lxr" id="centre_lxr" style="width: 82%;" class="required"
					   maxlength="100" value="<x:out select="$xmlData/data/proposal/centre_lxr"/>" label="中心联系人">
			</td>
			<td align="right">联系电话：</td>
			<td>
				<input type="text" name="proposal/tel_lxr" id="tel_lxr" style="width: 82%;" class="required "
					   maxlength="50"
					   value="<x:out select="$xmlData/data/proposal/tel_lxr"/>" label="中心联系人联系电话">
			</td>
		</tr>
		<tr>
			<td align="right">联系人手机：</td>
			<td>
				<input type="text" name="proposal/centre_xmlxr" id="centre_xmlxr" style="width: 82%;" class="required mobile"
					   onfocus="InitInput.setNumber(this,11,0,0)"
					    value="<x:out select="$xmlData/data/proposal/centre_xmlxr"/>" label="联系人手机">
			</td>
			<td align="right">电子邮箱：</td>
			<td>
				<input type="text" name="proposal/email_xmlxr" id="email_xmlxr" style="width: 82%;" class="required email"
					   maxlength="50"
					   value="<x:out select="$xmlData/data/proposal/email_xmlxr"/>" label="联系人电子邮箱">
			</td>
		</tr>
		<tr>
			<td align="right">归口管理部门：</td>
			<td colspan="3">
				<c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
				<cpt:tree key="recommended_org" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${recomend_org}"  id="recomend_org" showPattern="all" shieldPattern="0"
						  topCheckbox="false" onClick="initTreeValueExt" />
				<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value" style="width: 80%;" class="required" value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门">
				<input type="hidden" name="proposal/recomend_org_name" style="width: 80%;" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
			</td>
		</tr>
		<tr>
			<td align="right">申报日期：</td>
			<td colspan="3">
				<c:set var="submit_date">
					<x:out select="$xmlData/data/proposal/submit_date" />
				</c:set>
				<cpt:date id="apply_date_curr" name="proposal/submit_date" value="${submit_date}" className="required date" label="申报日期" ></cpt:date>
			</td>
		</tr>
	</table>
</div>
<script>
	function initTreeValueExt(treeId, treeNode) {
		if ((treeNode && treeNode.isParent)) {
			scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
			return false;
		}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			str = obj.name + "-" + str;
			obj = obj.parentNode;
		}

		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
	}
	function initTreeValueExt(treeId, treeNode) {
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label") + messageTip.researchAreaInvalidDisciplineCode);
			if (treeNode.level == 0) {
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
			}
			return false;
		}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(str);
	}
</script>